/**
 *
 */
package com.gome.axwl.aoc.service.feign;

import com.gome.axwl.aoc.common.constants.FeignServiceName;
import com.gome.axwl.aoc.common.constants.OrderReqMapConstant;
import com.gome.axwl.aoc.entity.driver.DriverIntegrationParamForOcsDto;
import com.gome.axwl.aoc.entity.dto.DriverEvaluationDataFromOrderDto;
import com.gome.axwl.aoc.service.feign.fallback.OrderFeignFallBack;
import com.gome.commons.core.ResultData;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 项目名称：gome.axwl.op.service
 * 类名称：OrderFeignClient
 * 类描述：
 * 创建人：chengh
 * 创建时间：2018年4月25日10:07:42
 */
@FeignClient(value = FeignServiceName.GATE_WAY + FeignServiceName.OCS, fallback = OrderFeignFallBack.class)
public interface OrderFeignClient {

    /**
     * 分页查询订单列表
     * @param orderNo
     * @param customerAccount
     * @param carrierId
     * @param status
     * @param pickStartTime
     * @param pickEndTime
     * @param deliverStartTime
     * @param deliverEndTime
     * @param acceptDcIds
     * @param pageNum
     * @param pageSize
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value = OrderReqMapConstant.getOrderList)
    ResultData getOrderList(@RequestParam("orderNo") String orderNo, @RequestParam("customerAccount") String customerAccount, @RequestParam("serviceProviderId") String serviceProviderId, @RequestParam("carrierId") String carrierId, @RequestParam("status") String status, @RequestParam("pickStartTime") String pickStartTime,
                            @RequestParam("pickEndTime") String pickEndTime, @RequestParam("deliverStartTime") String deliverStartTime, @RequestParam("deliverEndTime") String deliverEndTime, @RequestParam("acceptDcIds") Integer[] acceptDcIds, @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize,@RequestParam("taskNo") String taskNo, @RequestParam("waybillNo") String waybillNo, @RequestParam("orderType") String orderType);

    /**
     * 根据订单号查询运单列表
     *
     * @param pageSize
     * @param pageNum
     * @param orderId
     * @param taskNo
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value = OrderReqMapConstant.getWaybillByOrderNo)
    ResultData getWaybillByOrderNo(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNum") Integer pageNum, @RequestParam("taskNo") String taskNo, @RequestParam("orderId") String orderId);

    /**
     * 查询订单详情
     *
     * @param orderNo
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value = OrderReqMapConstant.getOrderDetail)
    ResultData getOrderDetail(@RequestParam("orderNo") String orderNo);

    /**
     * 查询运单详情
     *
     * @param waybillNo
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value = OrderReqMapConstant.getWaybillDetail)
    ResultData getWaybillDetail(@RequestParam("waybillNo") String waybillNo);

    /**
     * 状态字典查询
     *
     * @param code
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value = OrderReqMapConstant.getStatus)
    ResultData getStatus(@RequestParam("code") String code);

    /**
     * 查询接单天数详情
     * @param driverId
     * @param month
     * @return
     */
	@RequestMapping(method = RequestMethod.GET, value =OrderReqMapConstant.getDriverWorkDays)
	ResultData queryDriverTakingsDetail(@RequestParam("driverId")Integer driverId,@RequestParam("month")String month);

    /**
     * 查询评价信息
     * @param driverId
     * @param month
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, value =OrderReqMapConstant.queryDriverCount)
	ResultData<DriverEvaluationDataFromOrderDto> queryDriverCount(@RequestParam("driverId")Integer driverId,@RequestParam("month")String month);

    /**
     * 批量查询评价信息
     * @param driverIntegrationParamForOcsDto
     * @return
     */
    @RequestMapping(method = RequestMethod.POST, value =OrderReqMapConstant.queryDriverCounts)
    ResultData<List<DriverEvaluationDataFromOrderDto>> queryDriverCounts(@RequestBody DriverIntegrationParamForOcsDto driverIntegrationParamForOcsDto);


}
